package com.bill.common.business.dto;

import java.text.DecimalFormat;

import com.bill.common.utils.DoubleFormat;

public class CurrentSaleDTO {
	
	private Double closingPrice=0D;//上次收盘价
	private Double currentPrice=0D;//当前股价
	private Double todayClinchMoney=0D;//今日成交额
	private Double todayClinchShare=0D;//今日成交股
	private Double zhangfu=0D;//涨幅
	public Double getClosingPrice() {
		return closingPrice;
	}
	public void setClosingPrice(Double closingPrice) {
		this.closingPrice = closingPrice;
	}
	public Double getCurrentPrice() {
		if(currentPrice==null){
			currentPrice =0D;
		}
		return currentPrice;
	}
	public void setCurrentPrice(Double currentPrice) {
		this.currentPrice = currentPrice;
	}
	public Double getTodayClinchMoney() {
		if(todayClinchMoney==null){
			todayClinchMoney =0D;
		}
		return todayClinchMoney;
	}
	public void setTodayClinchMoney(Double todayClinchMoney) {
		this.todayClinchMoney = todayClinchMoney;
	}
	public Double getTodayClinchShare() {
		if(todayClinchShare==null){
			todayClinchShare =0D;
		}
		return todayClinchShare;
	}
	public void setTodayClinchShare(Double todayClinchShare) {
		this.todayClinchShare = todayClinchShare;
	}
	public Double getZhangfu() {
		DecimalFormat df = new DecimalFormat("0.00"); 
		if(this.getCurrentPrice()>0){
			zhangfu = Double.parseDouble(df.format(((getCurrentPrice()-0.1)/0.1*100)));
		}else{
			zhangfu = 0D;
		}
		
		return zhangfu;
	}
	public void setZhangfu(Double zhangfu) {
		this.zhangfu = zhangfu;
	}
	
	
}
